/**
  ******************************************************************************
  * @author     Chris
  * @since      2024/7/14 22:43
  *
  * @file       hd_flash.c
  * @brief      Xxx hardware driver.
  *
  * @note       This file contains the hardware driver for the Xxx.
  *
  * @warning    None.
  ******************************************************************************
  * Change Logs:
  *   Date          Author       Notes
  *   2024/7/14     Chris        the first version
  *
  ******************************************************************************
  */


#include "hd_flash.h"
#include <string.h>

const uint8_t dotMatrix[] = {
    0x00, 0x00, 0x02, 0x00, 0xF2, 0x3F, 0x12, 0x02, 0x12, 0x01, 0xFE, 0x00, 0x12, 0x05, 0x12, 0x02, 0x12, 0x01, 0xFE,
    0x00, 0x12, 0x21, 0x12, 0x22, 0xF2, 0x3F, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,

};


static void StorageFlash_read(Storage* this, uint8_t* buffer, uint32_t address, const uint32_t count) {
    memcpy(buffer, dotMatrix, count);
}

void StorageFlash_constructor(StorageFlash* this) {
    static struct StorageVtbl vtbl = {
        .read = &StorageFlash_read
    };
    Storage_constructor(&this->super);
    this->super.vptr = &vtbl;
}
